﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="GC.aspx.cs" Inherits="Xiaov.SmartWeb.Application.TZGC.GC" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>
    <link href="../Resources/momo/easyui.css" rel="stylesheet" type="text/css" />
    <link href="../Resources/momo/report.css" rel="stylesheet" type="text/css" />
    <link href="../Resources/momo/gridview.css" rel="stylesheet" type="text/css" />
    <link href="../Resources/momo/icon.css" rel="stylesheet" type="text/css" />
    <link rel="stylesheet" type="text/css" href="/Resources/easyui-1.32/themes/default/easyui.css" />
    <link rel="stylesheet" type="text/css" href="/Resources/easyui-1.32/themes/icon.css" />
    <link rel="stylesheet" type="text/css" href="/Resources/xiaovcn/css/main.css" />
    <script type="text/javascript" src="/Resources/easyui-1.32/jquery-1.8.0.min.js"></script>
    <script type="text/javascript" src="/Resources/easyui-1.32/jquery.easyui.min.js"></script>
    <script type="text/javascript" src="/Resources/xiaovcn/scripts/usercheck.js"></script>
    <script language="javascript">
        function checkform() {
            return $("#form1").form('validate');
        }
        function aa() {
            if (confirm('Are you sure？')) {
                return true;
            }
            return false;
        }

        $(function () {
            $('#content').height(userScreenHeight);
        });

    
    </script>
    <style type="text/css">
        .GridViewStyle
        {
            border-style: dotted;
            border-color: #808080;
            font-size: 12px;
            border-top-width: 1px;
            border-right-width: 1px;
            border-bottom-width: 1px;
            border-left-width: 1px;
            border-collapse: collapse;
        }
        table
        {
            border-collapse: collapse;
        }
        
        .GridViewHeaderStyle
        {
            font-weight: normal;
            color: #333333;
            border-collapse: collapse;
        }
        
        .GridViewSelectedRowStyle, td, th
        {
            border-width: 1px;
            border-color: #808080;
            border-style: dotted;
            font-size: 12px;
            border-collapse: collapse;
        }
        
        .GridViewRowStyle, td, th
        {
            padding: 3px;
        }
        
        .GridViewHeaderStyle tr, th
        {
            background-color: #F2F2F2;
            background-image: url('http://localhost/themes/default/images/datagrid_title_bg.png');
            height: 25px;
        }
        .GridViewRowStyle
        {
            color: #333333;
        }
        .GridViewStyle a
        {
            color: #333333;
        }
        
        .GridViewAlternatingRowStyle
        {
            /*background-color: #E4EEFC;*/
            background-color: #F7F7F7;
        }
        
        .GridViewPagerStyle
        {
            background-color: #F7F7F7;
            color: #FFFFFF;
        }
        .GridViewPagerStyle table td
        {
            border-width: 0px;
            border-style: solid;
        }
        .GridViewPagerStyle tr td span
        {
            border-right: #000099 1px solid;
            padding-right: 5px;
            border-top: #000099 1px solid;
            padding-left: 5px;
            font-weight: bold;
            padding-bottom: 2px;
            margin: 2px;
            border-left: #000099 1px solid;
            color: #fff;
            padding-top: 2px;
            border-bottom: #000099 1px solid;
            background-color: #000099;
        }
        .GridViewPagerStyle tr td a
        {
            border-right: #aaaadd 1px solid;
            padding-right: 5px;
            border-top: #aaaadd 1px solid;
            padding-left: 5px;
            padding-bottom: 2px;
            margin: 2px;
            border-left: #aaaadd 1px solid;
            color: #000099;
            padding-top: 2px;
            border-bottom: #aaaadd 1px solid;
            text-decoration: none       ;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div id="content" style="overflow: scroll;">
        <table width="100%">
            <tr>
                <td valign="top">
                    <table width="90%">
                        <tr>
                            <td>
                                完成状态：<asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True" OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged">
                                    <asp:ListItem Value="0" Selected="True">未完成</asp:ListItem>
                                    <asp:ListItem Value="1">已完成</asp:ListItem>
                                    <asp:ListItem Value="-1">全部</asp:ListItem>
                                </asp:DropDownList>
                            </td>
                            <td>
                                类别：<asp:DropDownList ID="DropDownList2" runat="server" OnSelectedIndexChanged="DropDownList2_SelectedIndexChanged"
                                    AutoPostBack="True">
                                    <asp:ListItem Value="1钻井" Selected="True">钻井</asp:ListItem>
                                    <asp:ListItem Value="2地面">地面</asp:ListItem>
                                    <asp:ListItem Value="3其它">其它</asp:ListItem>
                                    <asp:ListItem Value="0全部">全部</asp:ListItem>
                                </asp:DropDownList>
                            </td>
                            <td>
                                工程名称：<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
                                <asp:Button ID="Button6" runat="server" Text="查询" OnClick="Button6_Click" />
                            </td>
                            <td>
                                <asp:Button ID="Button3" runat="server" Text="工程导入" onclick="Button3_Click" />
                            </td>
                        </tr>
                        <tr>
                            <td colspan="4">
                                <asp:GridView ID="GridView1" runat="server" Width="100%" AllowPaging="True" AutoGenerateColumns="False"
                                    OnPageIndexChanging="GridView1_PageIndexChanging" OnRowCommand="GridView1_RowCommand"
                                    PageSize="11" OnRowCreated="GridView1_RowCreated" OnRowDataBound="GridView1_RowDataBound">
                                    <Columns>
                                        <asp:BoundField HeaderText="序号" />
                                        <asp:BoundField DataField="GCMC" HeaderText="工程名称" />
                                        <asp:BoundField DataField="XMMC" HeaderText="所属项目" />
                                        <asp:BoundField DataField="GCLBMC" HeaderText="工程类别" />
                                        <asp:BoundField DataField="ZT" HeaderText="完成状态" />
                                        <asp:TemplateField HeaderText="操作">
                                            <ItemTemplate>
                                                <asp:LinkButton ID="Button2" runat="server" CommandArgument='<%# Eval("GCID") %>'
                                                    CommandName="bianji" Text="编辑" />
                                                &nbsp;|&nbsp;<asp:LinkButton ID="Button4" runat="server" CommandArgument='<%# Eval("GCID") %>'
                                                    CommandName="shanchu" OnClientClick="return aa()" Text="删除" />
                                                &nbsp;
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:BoundField DataField="GCID" HeaderText="GCID" />
                                        <asp:BoundField DataField="GCBM" HeaderText="GCBM" />
                                        <asp:BoundField DataField="rowid" HeaderText="rowid" />
                                    </Columns>
                                </asp:GridView>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="4">
                                <table>
                                    <tr>
                                        <td>
                                            工程名称：
                                        </td>
                                        <td>
                                            <asp:HiddenField ID="hfGCID" runat="server" />
                                            <asp:TextBox ID="txtgcmc" runat="server" class="easyui-validatebox" required="true"
                                                missingMessage="必填项" Width="300px"></asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            工程类别：
                                        </td>
                                        <td>
                                            <asp:DropDownList ID="DropDownList3" runat="server">
                                                <asp:ListItem Value="1钻井">钻井</asp:ListItem>
                                                <asp:ListItem Value="2地面">地面</asp:ListItem>
                                                <asp:ListItem Value="3其它">其它</asp:ListItem>
                                            </asp:DropDownList>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            是否完成：
                                        </td>
                                        <td>
                                            <asp:CheckBox ID="cbSFWC" runat="server" />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <asp:Button ID="btn_save" runat="server" Text="增加" OnClick="btn_save_Click" OnClientClick="return checkform();" />
                                            <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="清空" />
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
    </div>
    </form>
</body>
</html>
